package com.tangkeyon.Test;

import java.lang.reflect.Method;

/**
 * @Author: tangkeyon@gmail.com
 * @Date: 2019/6/4 10:04
 * @Version 1.0
 */
public class Demo {
    private String name;
    int age;

    public void function1(){
        System.out.println("function1");
    }

    public static void main(String[] args) {
        Demo demo=new Demo();
        Method[] methods = demo.getClass().getMethods();
        for(Method method:methods){
            System.out.println(method.getDeclaringClass());
        }

    }
}
